package cn.online.taxi.order.service.service;

import cn.online.taxi.manager.dto.front.Order;
import com.alibaba.dubbo.config.annotation.Service;

/**
 * @Author BinBini
 * @Date 2021/4/7 9:31
 * @Version 1.0
 */
@Service
public interface OrderService {

    /**
     * 暂时无用
     * @param orderId
     * @param driverId
     * @return
     */
    boolean grab(Integer orderId, long driverId);

    /**
     * 去接乘客
     * @param orderNumber
     * @param driverId
     * @return
     */
    boolean receiving(String orderNumber, Integer driverId);

    /**
     * 乘客上车，司机开始行程（司机输入乘客尾号后四位才能出发）
     * @param orderNumber
     * @param driverId
     * @param phone       乘客手机尾号后四位
     * @param receivePassengerLongitude
     * @param receivePassengerLatitude
     * @return
     */
    boolean startJourney(String orderNumber, Integer driverId, String phone, String receivePassengerLongitude, String receivePassengerLatitude);

    /**
     * 司机手动结束行程
     * @param orderNumber
     * @param driverId
     * @param passengerGetoffLongitude
     * @param passengerGetoffLatitude
     * @return
     */
    boolean endJourney(String orderNumber, Integer driverId, String passengerGetoffLongitude, String passengerGetoffLatitude);

    /**
     * 司机发起收费
     * @param orderNumber
     * @param driverId
     * @return
     */
    boolean charge(String orderNumber, Integer driverId);

    Order getOrderRedisByNumber(String orderNumber);
}
